home *** CD-ROM | disk | FTP | other *** search
/ Safarir 3 / SafTV-CD3.iso / pc / Bonus / Dessins Animés / static / jeux / teletub.swf / scripts / DefineButton2_198 / BUTTONCONDACTION on(press).as
Text File  |  2001-11-21  |  2KB  |  42 lines

  1. on(press){
  2.    tellTarget("../Actions_Weapons")
  3.    {
  4.       gotoAndStop("FireWeapon");
  5.       play();
  6.    }
  7.    if(eval("/:Weapon") == "2")
  8.    {
  9.       if("0" < eval("/:Rounds"))
  10.       {
  11.          set("/:CowCounter","1");
  12.          while("5" >= eval("/:CowCounter"))
  13.          {
  14.             duplicateMovieClip("../CowSplat","Blood" add eval("/:Index"),eval("/:Index") + 16384);
  15.             setProperty("../Blood" add eval("/:Index"), _rotation, random("360"));
  16.             setProperty("../Blood" add eval("/:Index"), _X, getProperty("../Cursor", _X));
  17.             setProperty("../Blood" add eval("/:Index"), _Y, getProperty("../Cursor", _Y));
  18.             tellTarget("../Blood" add eval("/:Index"))
  19.             {
  20.                gotoAndPlay(2);
  21.             }
  22.             set("/:Index",eval("/:Index") + "1");
  23.             set("/:CowCounter",eval("/:CowCounter") + "1");
  24.          }
  25.          duplicateMovieClip("../Score-10","Score-10" add eval("/:Index"),eval("/:Index") + 16384);
  26.          setProperty("../Score-10" add eval("/:Index"), _X, getProperty("../Cursor", _X));
  27.          setProperty("../Score-10" add eval("/:Index"), _Y, getProperty("../Cursor", _Y) - "100");
  28.          tellTarget("../Score-10" add eval("/:Index"))
  29.          {
  30.             gotoAndPlay(2);
  31.          }
  32.          set("/:Index",eval("/:Index") + "1");
  33.          set("/:Score",eval("/:Score") - "10");
  34.          if(eval("/:Score") < "0")
  35.          {
  36.             set("/:Score","0");
  37.          }
  38.          gotoAndPlay(2);
  39.       }
  40.    }
  41. }
  42.